<%-- 
    Document   : DeleteProduct
    Created on : Mar 29, 2012, 4:58:17 AM
    Author     : Tokino
--%>


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1" />
        <META Http-Equiv="Cache-Control" Content="no-cache"/>
        <META Http-Equiv="Cache-Control" Content="no-store"/>
        <META Http-Equiv="Pragma" Content="no-cache"/>
        <META Http-Equiv="Expires" Content="0"/>

        <%
            response.setHeader("Cache-Control", "no-cache, must-revalidate, no-store");
            response.setHeader("Pragma", "no-cache");
            response.setDateHeader("Expires", 0);

        %>
    </head>
    <link rel="stylesheet" href="../style/style.css" type="text/css" id="" media="print, projection, screen" />

    <jsp:useBean id="formDeleteProduct" class="servlets.DeleteProduct" scope="request"/>

    <jsp:useBean id="SecprogScopeSession" class=
                 "servlets.SecprogScopeSession" scope="session" />
    <%
        if (SecprogScopeSession.getAccounttype() == 1) {
            response.sendRedirect("../customer/CMain.jsp");
        } else if (SecprogScopeSession.getAccounttype() == 2) {
            response.sendRedirect("../accounting/PCMain.jsp");
        } else if (SecprogScopeSession.getAccounttype() == 10) {
            response.sendRedirect("../admin/AMain.jsp");
        }
        if (!SecprogScopeSession.getIsLogin()) {
            response.sendRedirect("../index.jsp");
        }

    %>
    <body bgcolor="#FFFACD">

        <table width="94%" border="0" align="center">

            <tr >
                <td style="background-color:#FFA500; height:100px">

                </td>
            </tr>
            <tr style="background-color:#FFA500; height:30px" align="center">

                <td><a href="PMain.jsp">Home</a><font color="#FFFFFF" face="Arial">|</font>
                    <a href="ViewProduct.jsp">Product</a><font color="#FFFFFF" face="Arial">|</font>
                    <a href=""></a><font color="#FFFFFF" face="Arial">|</font>
                    <a href="PSettings.jsp">Settings</a><font color="#FFFFFF" face="Arial">|</font>
                    <a href="../logout/LogoutProcess.jsp">Logout</a>
                </td>

            </tr>

            <tr style="background-color:#FFA500; height:30px" align="center">

                <td><a href="AddProduct.jsp">Add Product</a><font color="#FFFFFF" face="Arial">|</font>
                    <a href="ViewProduct.jsp">View Product</a><font color="#FFFFFF" face="Arial">|</font>
                     <a href="EditProduct.jsp">Edit Product</a><font color="#FFFFFF" face="Arial">|</font>
                    <a href="DeleteProduct.jsp">Delete Product</a>


                </td>

            </tr>


            <tr style="background-color:#FFA500; height:30px" align="center">

                <td><a50>Welcome Manager <%= SecprogScopeSession.getFullName()%><font color="#FFFFFF" face="Arial">|</font>
                Manager since <%= SecprogScopeSession.getDatecreated()%><font color="#FFFFFF" face="Arial">|</font>
                Last Login is <%= SecprogScopeSession.getLastlogin()%></a50>
        </td>

    </tr>

    <tr>
        <td style="padding-top:5%; padding-left:10%; padding-right:10%; padding-bottom:5%; background-color:#EEEEEE;height:auto;width:920px;">
    <a1>Delete Product</a1><br>
    <a53><%=formDeleteProduct.getErrorMsg("status")%></a53><br>
    <a51>* Required Fields</a51>


    <form name="deleteproduct" method="post" action="DeleteProductProcess.jsp">
        <table>
            <tr>
                <td><a50>*Title/Name: </a50></td>
            <td><input type="text" name="title" value='<%=formDeleteProduct.getTitle()%>'/>
            <br><a52><%=formDeleteProduct.getErrorMsg("title")%></a52></td>
            </tr>

               <tr>
                <td><a50>*Category: </a50></td>
            <td><input  readonly="readonly" type="text" name="category" value="<%

                if (SecprogScopeSession.getAccounttype() == 3) {
                    out.print("Book");
                }
                if (SecprogScopeSession.getAccounttype() == 4) {
                    out.print("Magazine");
                }
                if (SecprogScopeSession.getAccounttype() == 5) {
                    out.print("Audio CD");
                }
                if (SecprogScopeSession.getAccounttype() == 6) {
                    out.print("Movie");

                }


                        %>"/>
            <br><a52><%=formDeleteProduct.getErrorMsg("category")%></a52></td>
            </tr>         
            
            
            
            <tr>
                <td><a50>*Type: </a50></td>
           
                <%  if (SecprogScopeSession.getAccounttype() == 3) {
                %>   <td>
                <select name="mtype" >
                    <option value="0" <% if (!(formDeleteProduct.getMtype().equals("0"))) {
                            out.print("SELECTED");
                        }%> >- Select Type -</option>
                    <option value="Paperback" <% if (formDeleteProduct.getMtype().equals("Paperback")) {
                            out.print("SELECTED");
                        }%> >Paperback</option>
                    <option value="Mass-market" <% if (formDeleteProduct.getMtype().equals("Mass-market")) {
                            out.print("SELECTED");
                        }%> >Mass-market</option>
                    <option value="Hardcover" <% if (formDeleteProduct.getMtype().equals("Hardcover")) {
                            out.print("SELECTED");
                        }%> >Hardcover</option>
                </select>  
            <br><a52><%=formDeleteProduct.getErrorMsg("mtype")%></a52>
            </td>
 <% }%>

 
            <%  if (SecprogScopeSession.getAccounttype() == 4) {
            %>  <td>  
                              <select name="mtype" >
                    <option value="0" <% if (!(formDeleteProduct.getMtype().equals("0"))) {
                            out.print("SELECTED");
                        }%> >- Select Type -</option>
                    <option value="Fashion" <% if (formDeleteProduct.getMtype().equals("Fashion")) {
                            out.print("SELECTED");
                        }%> >Fashion</option>
                    <option value="Home & Garden" <% if (formDeleteProduct.getMtype().equals("Home & Garden")) {
                            out.print("SELECTED");
                        }%> >Home & Garden</option>
                    <option value="Entertainment" <% if (formDeleteProduct.getMtype().equals("Entertainment")) {
                            out.print("SELECTED");
                        }%> >Entertainment</option>
                    <option value="Cooking" <% if (formDeleteProduct.getMtype().equals("Cooking")) {
                            out.print("SELECTED");
                        }%> >Cooking</option>
                    <option value="Craft" <% if (formDeleteProduct.getMtype().equals("Craft")) {
                            out.print("SELECTED");
                        }%> >Craft</option>
                </select>  
            <br><a52><%=formDeleteProduct.getErrorMsg("mtype")%></a52>
            </td> <% }%>
         


            <%  if (SecprogScopeSession.getAccounttype() == 5) {
            %>  <td>    
                             <select name="mtype" >
                    <option value="0" <% if (!(formDeleteProduct.getMtype().equals("0"))) {
                            out.print("SELECTED");
                        }%> >- Select Type -</option>
                    <option value="CD" <% if (formDeleteProduct.getMtype().equals("CD")) {
                            out.print("SELECTED");
                        }%> >CD</option>
                    <option value="MP3" <% if (formDeleteProduct.getMtype().equals("MP3")) {
                            out.print("SELECTED");
                        }%> >MP3</option>
                </select>
            <br><a52><%=formDeleteProduct.getErrorMsg("mtype")%></a52>
            </td>  <% }%>   
                  
          
                <%  if (SecprogScopeSession.getAccounttype() == 6) {
                %>    <td>  
                <select name="mtype" >
                    <option value="0" <% if (!(formDeleteProduct.getMtype().equals("0"))) {
                            out.print("SELECTED");
                        }%> >- Select Type -</option>
                    <option value="DVD" <% if (formDeleteProduct.getMtype().equals("DVD")) {
                            out.print("SELECTED");
                        }%> >DVD</option>
                    <option value="Blue-ray" <% if (formDeleteProduct.getMtype().equals("Blue-ray")) {
                            out.print("SELECTED");
                        }%> >Blue-ray</option>
                </select>
             
            <br><a52><%=formDeleteProduct.getErrorMsg("mtype")%></a52>
            </td>   <% }%> 
            </tr>
            <tr>
                <td><a50>Password: </a50></td>
            <td><input type="password" name="password" value="<%=formDeleteProduct.getPassword()%>"/>
            <br><a52><%=formDeleteProduct.getErrorMsg("password")%></a52></td>
            </tr>
           
   
            <tr>
                <td><a50><input type="submit" name="bt_submit" value="Delete"/></a50></td>
          
            </tr>
        </table>
    </form>


    username is <%= SecprogScopeSession.getUserName()%>
    Session  is <%= SecprogScopeSession.getIsLogin()%>
    accounttype  is <%= SecprogScopeSession.getAccounttype()%>
    Session  is <%= SecprogScopeSession.getSessionid()%>

</td>
</tr>

<tr>
    <td colspan="2" style="background-color:#FFA500;text-align:center;">
        Copyright © 2011</td>
</tr>
</table>

</body>
</html> 